﻿<?xml version="1.0" encoding="utf-8"?>
<Recipe Name="CreateDataRepositoriesFromDCProjectCS" xmlns="http://schemas.microsoft.com/pag/gax-core" xmlns:xi="http://www.w3.org/2001/XInclude" Bound="false">
  <DocumentationLinks>
    <Link Kind="Documentation" Caption="How to: Create Repository Classes" Url="ms-help://MS.VSCC.v80/MS.VSIPCC.v80/ms.wssf.2006Dec/WSSF/html/10-090-How_to_Create_Data_Repository_Classes.htm" />
    <Link Kind="Documentation" Caption="Repository Pattern" Url="ms-help://MS.VSCC.v80/MS.VSIPCC.v80/ms.wssf.2006Dec/WSSF/html/08-060-Repository.htm" />
  </DocumentationLinks>
  <xi:include href="../Common/CommonTypeAliases.xml" xpointer="xmlns(gax=http://schemas.microsoft.com/pag/gax-core) xpointer(/gax:Types)" />
  <Caption>Create data repository classes from business entities (C#)</Caption>
  <Description>Create data repository classes from business entities (C#)</Description>
  <HostData>
    <Icon ID="9941" />
    <CommandBar Menu="Project" />
  </HostData>
  <Arguments>
    <xi:include href="../Common/CommonArguments.xml" xpointer="xmlns(gax=http://schemas.microsoft.com/pag/gax-core) xpointer(/gax:Arguments/gax:Argument)" />
    <Argument Name="CurrentProject" Type="EnvDTE.Project, EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
      <Converter Type="ProjectConverter" />
      <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.Solution.ValueProviders.CurrentProjectProvider, Microsoft.Practices.RecipeFramework.Library" />
    </Argument>
    
    
    <Argument Name="DataAccessProject" Type="EnvDTE.Project, EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
      <Converter Type="ProjectConverter" />
      <ValueProvider Type="Microsoft.Practices.RecipeFramework.Extensions.ValueProviders.VisualStudio.CurrentProjectProvider, Microsoft.Practices.RecipeFramework.Extensions" />
    </Argument>
    <Argument Name="DataAccessClassNamespace">
      <ValueProvider Type="Evaluator" Expression="$(DataAccessProject.Properties.Item('DefaultNamespace').Value.ToString())" />
    </Argument>

    <Argument Name="BusinessEntitiesProject" Type="EnvDTE.Project, EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
      <Converter Type="Microsoft.Practices.RepositoryFactory.Converters.ProjectWithResponsibilityConverter, Microsoft.Practices.RepositoryFactory" ResponsibilityArgument="IsBusinessEntityProject" />
      <ValueProvider Type="Microsoft.Practices.RepositoryFactory.ValueProviders.ProjectsWithResponsibilityProvider, Microsoft.Practices.RepositoryFactory" ResponsibilityArgument="IsBusinessEntityProject" CurrentProjectArgument="CurrentProject" />
    </Argument>
    
    <Argument Name="BusinessEntityClassNamespace">
      <ValueProvider Type="Evaluator" Expression="$(BusinessEntitiesProject.Properties.Item('DefaultNamespace').Value.ToString())">
        <MonitorArgument Name="BusinessEntitiesProject"/>
      </ValueProvider>
    </Argument>
    
    <Argument Name="EntitiesStoredProcedureMappings" Type="System.Collections.ArrayList, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    <Argument Name="ProjectEntities" Type="System.Collections.ArrayList, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
      <ValueProvider Type="Microsoft.Practices.RepositoryFactory.ValueProviders.EntityVP, Microsoft.Practices.RepositoryFactory" ProjectArgument="BusinessEntitiesProject">
        <MonitorArgument Name="BusinessEntitiesProject" />
      </ValueProvider>
    </Argument>
    <Argument Name="Entities" Type="System.Collections.ArrayList, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    <xi:include href="../Common/CommonConnectionStringWizardPages.xml" xpointer="xmlns(gax=http://schemas.microsoft.com/pag/gax-core) xpointer(/gax:Recipe/gax:Arguments/gax:Argument)" />
    <xi:include href="CreateEntityRepositoryAssets.xml" xpointer="xmlns(gax=http://schemas.microsoft.com/pag/gax-core) xpointer(/gax:Recipe/gax:Arguments/gax:Argument)" />
  </Arguments>
  <GatheringServiceData>
    <Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0" Help="ms-help://MS.VSCC.v80/MS.VSIPCC.v80/ms.wssf.2006Dec/WSSF/html/10-090-How_to_Create_Data_Repository_Classes.htm">
      <Pages>
        <xi:include href="../Common/CommonConnectionStringWizardPages.xml" xpointer="xmlns(gax=http://schemas.microsoft.com/pag/gax-core) xmlns(gaxw=http://schemas.microsoft.com/pag/gax-wizards) xpointer(/gax:Recipe/gax:GatheringServiceData/gaxw:Wizard/gaxw:Pages/gaxw:Page)" />
        <Page>
          <Title>Project properties</Title>
          <LinkTitle>Specify projects</LinkTitle>
          <Help>Specify projects.</Help>
          <Fields>
            <Field Label="Business entities project" ValueName="BusinessEntitiesProject">
              <Tooltip>Business entities project.</Tooltip>
            </Field>
          </Fields>
        </Page>
        <Page Type="Microsoft.Practices.RepositoryFactory.CustomPages.EntitiesFromClassesSelectorCP, Microsoft.Practices.RepositoryFactory">
          <Title>Entities</Title>
          <LinkTitle>Specify entities</LinkTitle>
          <Help>Specify the entities that you want to create the repositories from.</Help>
        </Page>
        <xi:include href="CreateEntityRepositoryAssets.xml" xpointer="xmlns(gax=http://schemas.microsoft.com/pag/gax-core) xmlns(gaxw=http://schemas.microsoft.com/pag/gax-wizards) xpointer(/gax:Recipe/gax:GatheringServiceData/gaxw:Wizard/gaxw:Pages/gaxw:Page)" />
      </Pages>
    </Wizard>
  </GatheringServiceData>
  <Actions CoordinatorServiceType="Microsoft.Practices.RecipeFramework.Extensions.Coordinators.ConditionalCoordinator, Microsoft.Practices.RecipeFramework.Extensions">
    <xi:include href="CreateEntityRepositoryAssets.xml" xpointer="xmlns(gax=http://schemas.microsoft.com/pag/gax-core) xpointer(/gax:Recipe/gax:Actions/gax:Action)" />
  </Actions>
</Recipe>